package com.lwj.liwanjia.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.lwj.liwanjia.R;
import com.superrecycleview.superlibrary.adapter.BaseViewHolder;
import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter;

import java.util.List;

/**
 * Created by Administrator on 2018/1/18.
 */

public class TuijianAdapter extends SuperBaseAdapter<Integer> {
    private Context mContext;

    public TuijianAdapter(Context context, List<Integer> data) {
        super(context, data);
        this.mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder holder, Integer item, int position) {
        Glide.with(mContext).load(item).into((ImageView) holder.getView(R.id.tuijian_image));
    }

    @Override
    protected int getItemViewLayoutId(int position, Integer item) {
        return R.layout.tuijian_item;
    }
}
